import os

dir = r'F:\AIOPS\移动研究院\code\label-tool-cyp\data\移动_txt_100'

for f in os.listdir(dir):
    os.rename(os.path.join(dir, f), os.path.join(dir, f"{f.split('_')[0]}.txt"))